<?php

namespace App;

use App\Traits\HasFileActions;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\SoftDeletes;

class PatentAssess extends BaseModel
{
    use SoftDeletes;
    use HasFileActions;

    protected $fillable = ['patent_name', 'patent_apply_id', 'expert_id', 'score', 'path', 'remark', 'state'];

    public function apply(): BelongsTo
    {
        return $this->belongsTo(PatentApply::class, 'patent_apply_id');
    }

    public function expert()
    {
        return $this->belongsTo(Expert::class);
    }
}
